<template>
  <van-card
      v-for="user in props.userList"
      :desc="user.profile"
      :title="user.userName"
      :thumb="user.avatarUrl"
  >
    <template #tags>
      <van-tag v-for="tag in user.tags" plain type="primary" style="margin-right: 8px; margin-top: 8px">
        {{tag}}
      </van-tag>
    </template>
    <template #footer>
      <van-button size="mini">联系我</van-button>
    </template>
  </van-card>
</template>

<script setup lang="ts">

// 定义一个类型
import {CurrentUser} from "../model/user";

interface UserCardListProps {
  userList: CurrentUser[];
}

const props = withDefaults(defineProps<UserCardListProps>(), {
  userList: () => {
    return []
  }
});

</script>

<style scoped>

</style>